Data Visualization

image-2.png

Matplotlib

Matplotlib is an important library for creating static, animated, and interactive figure visualizations in Python.

image-3.png

Seaborn

Seaborn is a library that uses Matplotlib underneath to plot graphs. It provides a high-level interface for drawing attractive and informative statistical graphics.

Grouping Data in Python

groupby function is used to split the data into groups based on some criteria such as mean, min, max value, standard deviation. It is stated by agg which is an alias for aggregate.

EXAMPLE - 1

Find the average age of the credit card users based on their genders.

Data Visualization Techniques

There are a number of ways to visualize data.

Here are some important data visualization techniques to know:

1. Bar Chart

Average credit card expenses based on cities

Seaborn Styles

There are multiple options for the background in seaborn such as;

- sns.set_style('darkgrid')

- sns.set_style('whitegrid')

- sns.set_style('dark')

- sns.set_style('white')

EXAMPLE - 2

Create a bar chart that shows credit card total amount they spent vs user gender with mathplot and seaborn libraries.

2. Pie Chart

Number of Observations of Cities

Seaborn "Countplot" has the same function as "Pie Chart"!

EXAMPLE - 3

3. Scatter Plot

image.png

4. Line Chart

Show the number of users who received credit cards on the basis of dates with a line chart

5. Histogram

Show the distribution of total expenditure with histogram

EXAMPLE - 4

Show age distribution with histogram.

Plotly

Relationship of Age-Total Expenditure Based on Genders

FINAL PROJECT